1. Field of the Invention
This invention relates to computer software, and more particularly to error detection in code.
2. Description of the Related Art
Being able to trace an error when it occurs in a program may be as important as error handling itself in software development. With C/C++ programs or libraries, what is often seen is that a function returns an error status (e.g. an error code) that may tell little or nothing about where (i.e. the frame in the call stack) the error occurred. Lacking this information may make debugging software and/or identifying the root cause of an error time consuming and difficult. This may be especially true for errors that are difficult to reproduce. Often, C/C++ programs rely on debugging tools to trace errors. These debugging tools may require special debug build libraries. In production, typically only optimized libraries are deployed.
The standard C++ language has Exception classes for error handling that may be used to provide more information for tracking error conditions. Modern high-level languages, e.g. the Java programming language and Microsoft Visual Basic NET, may provide APIs to get the stack trace for exceptions.